package com.jiai.cloud.feign;

import com.jiai.cloud.entity.TOrderdetails;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import static org.springframework.web.bind.annotation.RequestMethod.GET;
import static org.springframework.web.bind.annotation.RequestMethod.POST;

/**
 * Created by chenyu on 2017/5/24.
 */
@FeignClient("authentication")
public interface OrderDetailsAPI {

    //增
    @RequestMapping(value = "/api/v1/orderDetails/addOrderdetails")
    Object addOrderdetails(@RequestBody TOrderdetails tOrderdetails);

    //删
    @RequestMapping(value = "/api/v1/orderDetails/delete/{id}")
    Object delete(@PathVariable("id") Integer id);

    //ID查
    @RequestMapping(value = "/api/v1/orderDetails/findById/{id}")
    Object selectById(@PathVariable("id") Integer id);

    //查所有
    @RequestMapping(value = "/api/v1/orderDetails/findByAll/{page}")
    Object selectPage(@PathVariable("page") Integer page);

    //改(有就改，没有就插入)
    @RequestMapping(value = "/api/v1/orderDetails/edit")
    Object edit(TOrderdetails tOrderdetails);

}
